.class final Lnet/tsapps/topdeals/bh;
.super Ljava/lang/Object;

# interfaces
.implements Landroid/view/View$OnClickListener;


# instance fields
.field private synthetic a:Lnet/tsapps/topdeals/DetailActitivty;


# direct methods
.method constructor <init>(Lnet/tsapps/topdeals/DetailActitivty;)V
    .locals 0

    iput-object p1, p0, Lnet/tsapps/topdeals/bh;->a:Lnet/tsapps/topdeals/DetailActitivty;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public final onClick(Landroid/view/View;)V
    .locals 4

    const/4 v3, 0x0

    iget-object v0, p0, Lnet/tsapps/topdeals/bh;->a:Lnet/tsapps/topdeals/DetailActitivty;

    invoke-static {v0}, Lnet/tsapps/topdeals/DetailActitivty;->i(Lnet/tsapps/topdeals/DetailActitivty;)V

    iget-object v0, p0, Lnet/tsapps/topdeals/bh;->a:Lnet/tsapps/topdeals/DetailActitivty;

    invoke-static {v0}, Lnet/tsapps/topdeals/DetailActitivty;->e(Lnet/tsapps/topdeals/DetailActitivty;)Lnet/tsapps/topdeals/h/a;

    move-result-object v0

    iget-object v1, p0, Lnet/tsapps/topdeals/bh;->a:Lnet/tsapps/topdeals/DetailActitivty;

    invoke-static {v1}, Lnet/tsapps/topdeals/DetailActitivty;->d(Lnet/tsapps/topdeals/DetailActitivty;)Lnet/tsapps/topdeals/objects/Deal;

    move-result-object v1

    iget-wide v1, v1, Lnet/tsapps/topdeals/objects/Deal;->a:J

    invoke-virtual {v0, v1, v2}, Lnet/tsapps/topdeals/h/a;->b(J)Z

    move-result v0

    if-eqz v0, :cond_1

    iget-object v0, p0, Lnet/tsapps/topdeals/bh;->a:Lnet/tsapps/topdeals/DetailActitivty;

    invoke-static {v0}, Lnet/tsapps/topdeals/DetailActitivty;->h(Lnet/tsapps/topdeals/DetailActitivty;)Landroid/content/Context;

    move-result-object v0

    const-string v1, "Deal von Favoritenliste entfernt"

    invoke-static {v0, v1, v3}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/Toast;->show()V

    iget-object v0, p0, Lnet/tsapps/topdeals/bh;->a:Lnet/tsapps/topdeals/DetailActitivty;

    invoke-static {v0}, Lnet/tsapps/topdeals/DetailActitivty;->e(Lnet/tsapps/topdeals/DetailActitivty;)Lnet/tsapps/topdeals/h/a;

    move-result-object v0

    iget-object v1, p0, Lnet/tsapps/topdeals/bh;->a:Lnet/tsapps/topdeals/DetailActitivty;

    invoke-static {v1}, Lnet/tsapps/topdeals/DetailActitivty;->d(Lnet/tsapps/topdeals/DetailActitivty;)Lnet/tsapps/topdeals/objects/Deal;

    move-result-object v1

    iget-wide v1, v1, Lnet/tsapps/topdeals/objects/Deal;->a:J

    invoke-virtual {v0, v1, v2}, Lnet/tsapps/topdeals/h/a;->d(J)V

    :cond_0
    :goto_0
    iget-object v0, p0, Lnet/tsapps/topdeals/bh;->a:Lnet/tsapps/topdeals/DetailActitivty;

    invoke-static {v0}, Lnet/tsapps/topdeals/DetailActitivty;->j(Lnet/tsapps/topdeals/DetailActitivty;)V

    return-void

    :cond_1
    iget-object v0, p0, Lnet/tsapps/topdeals/bh;->a:Lnet/tsapps/topdeals/DetailActitivty;

    invoke-static {v0}, Lnet/tsapps/topdeals/DetailActitivty;->e(Lnet/tsapps/topdeals/DetailActitivty;)Lnet/tsapps/topdeals/h/a;

    move-result-object v0

    iget-object v1, p0, Lnet/tsapps/topdeals/bh;->a:Lnet/tsapps/topdeals/DetailActitivty;

    invoke-static {v1}, Lnet/tsapps/topdeals/DetailActitivty;->d(Lnet/tsapps/topdeals/DetailActitivty;)Lnet/tsapps/topdeals/objects/Deal;

    move-result-object v1

    iget-wide v1, v1, Lnet/tsapps/topdeals/objects/Deal;->a:J

    invoke-virtual {v0, v1, v2}, Lnet/tsapps/topdeals/h/a;->c(J)Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lnet/tsapps/topdeals/bh;->a:Lnet/tsapps/topdeals/DetailActitivty;

    invoke-static {v0}, Lnet/tsapps/topdeals/DetailActitivty;->h(Lnet/tsapps/topdeals/DetailActitivty;)Landroid/content/Context;

    move-result-object v0

    const-string v1, "Deal in Favoritenliste gespeichert"

    invoke-static {v0, v1, v3}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/Toast;->show()V

    goto :goto_0
.end method
